]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/keyboard: Only change the current source setting if it changed
authorRui Matos <tiagomatos@gmail.com>
Wed, 9 Jan 2013 01:01:59 +0000 (02:01 +0100)
committerRui Matos <tiagomatos@gmail.com>
Mon, 14 Jan 2013 10:11:00 +0000 (11:11 +0100)
This avoids all the work that goes on in various processes when
switching input sources if the activated source is the currently
configured one.

https://bugzilla.gnome.org/show_bug.cgi?id=691414

js/ui/status/keyboard.js

index c1b4ea1e23203dbcbf39e458b19679681ce767d4..590d2eeff3cb27338f0fa4d3cf89c7832c6484a6 100644 (file)
@@ -470,6 +470,8 @@ const InputSourceIndicator = new Lang.Class({
             let is = new InputSource(type, id, displayName, shortName, i);
 
             is.connect('activate', Lang.bind(this, function() {
+                if (this._currentSource.index == is.index)
+                    return;
                 this._settings.set_value(KEY_CURRENT_INPUT_SOURCE,
                                          GLib.Variant.new_uint32(is.index));
             }));